<template>
  <div class="album_part">
    <h2 class="part_tit">专辑</h2>
    <ul>
      <li v-for="item in albumList" class="album_list">
        <div class="list_inter">
          <router-link :to="{name:'album',query:{'aid':item.id}}">
            <a :href="item.albumUrl">
              <img :src="item.imgurl" alt="" loading="lazy" class="album_list_pic">
              <i class="icon_play"></i>
            </a>
          </router-link>
        </div>
        <a :title="item.name" class="album_list_name" href="#">{{item.name}}</a>
        <div class="album_list_date">{{item.date}}</div>
      </li>
    </ul>
  </div>

</template>

<script>
import {getAlbum} from "@/plugins/api";
export default {
  name: "AlbumOne",
  data(){
    return{
      albumList:[

      ]
    }
  },
  created() {
    this.getAlbumData()
  },
  methods:{
    getAlbumData(){
      let _this = this
      getAlbum().then(function (msg) {
        _this.albumList = msg.data.pageList.records;
      })

    }
  }

}
</script>

<style scoped>
.album_part{
  width: 1400px;
  margin:auto
}
.part_tit{
  font-size: 24px;
  font-weight: 400;
  line-height: 58px;
}
.album_list{
  width:20%;
  display: inline-block;
}
.album_list .list_inter{
  margin-right:20px;
  height: 16vw;
  overflow: hidden;
  position: relative;

}
.album_list_pic{
  width:100%;
  height: 100%;
}
.list_inter:hover .album_list_pic{
  transform:scale(1.07) translateZ(0);
  transition: transform .75s;
}
.album_list_name{
  color: black;
}
.album_list_name:hover{
  color:rgb(49,199,192);
}
.album_list_date{
  color:#999;
  height: 22px;
  text-overflow: ellipsis;
  overflow: hidden;
  /*强制同一行内显示所有文本文字*/
  white-space: nowrap;
}
.icon_play{
  background:url("https://y.qq.com/ryqq/static/media/cover_play.56974e6f.png?max_age=2592000");
  background-size:cover;
  height:70px;
  width: 70px;
  left: 50%;
  top:50%;
  margin:-35px;
  position:absolute;
  opacity: 0;
  tansform:scale(.7) translateZ(0);
  transition-property: opacity,transform;
  transition-duration: .5s;

}
.list_inter:hover .icon_play{
  opacity: 1;
  filter: none;
}
.list_inter:hover .icon_play{
  transform: scale(1) translateZ(0);
  transition-property: opacity,transform;
  transition-duration: .5s;
  cursor:pointer;
}


</style>